<?php
class Session
{
   private $_sessionName;
   private $_sessionPassword; 
   private $_sessionStringName;
   private $_sessionStringPassword;


   function __construct($sn, $sp, $ssn, $ssp)
   {
      $this->_sessionName=$sn;
      $this->_sessionPassword=$sp;
      $this->_sessionStringName=$ssn;
      $this->_sessionStringPassword=$ssp;
   }  


   public function close()
   {
      unset($_SESSION[$this->_sessionStringName]);
      unset($_SESSION[$this->_sessionStringPassword]);
      unset($this->_sessionName);
      unset($this->_sessionPassword);
      unset($this);
   }

   
   public function getName()
   {
      return $this->_sessionName;
   }  

 
   public function getPassword()
   {
      return $this->_sessionPassword;
   }  


   public function getStringName()
   {
      return $this->_sessionStringName;
   } 
 
   
   public function getStringPassword()
   {
      return $this->_sessionStringPassword;
   }  


   public function setName($n)
   {
      $this->_sessionName = $n;
      $_SESSION[$this->getStringName()] = $n;
   }  

 
   public function setPassword($p)
   {
      $this->_sessionPassword = $p;
      $_SESSION[$this->getStringPassword()] = $p;
   }  
   
}
?>